package com.qqq.portalservice.user.domain.dto;

import com.qqq.commondomain.domain.dto.LoginUserDTO;
import com.qqq.portalservice.user.domain.vo.UserVO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * C端用户DTO
 */
@Data
public class UserDTO extends LoginUserDTO {

    /**
     * 用户头像
     */
    private String avatar;

    /**
     * 对象转换
     * @return vo
     */
    public UserVO convertToVO(){
        UserVO userVO = new UserVO();
        BeanUtils.copyProperties(this, userVO);
        userVO.setNickName(this.getUserName());
        return userVO;
    }


}
